package com.shtel.bss.saas.tenant.manager;

import com.github.pagehelper.PageInfo;
import com.shtel.bss.saas.tenant.entity.SysGlobalAuth;

import java.util.List;

/**
 * 基础权限表管理
 * @author xiezhiwei 2020-02-05 22:27
 */
public class SysGlobalAuthManager {
    /**
     * 查询基础权限
     * @param sysGlobalAuth
     * @return
     */
    public static PageInfo<SysGlobalAuth> selectEntity(SysGlobalAuth sysGlobalAuth, int pageSize, int pageNum){
        return SysGlobalAuth.repository().selectEntity(sysGlobalAuth,pageSize,pageNum);
    }


    public static void saveEntity(SysGlobalAuth sysGlobalAuth){
        SysGlobalAuth.repository().save(sysGlobalAuth);
    }

    public static void updateEntity(SysGlobalAuth sysGlobalAuth){
        SysGlobalAuth.repository().updateEntity(sysGlobalAuth);
    }

    public static void removeEntity(SysGlobalAuth sysGlobalAuth){
        SysGlobalAuth.repository().remove(sysGlobalAuth);
    }

    public static PageInfo<SysGlobalAuth> selectEntityByTenantId(Long tenantId, int pageSize, int pageNum){
        return SysGlobalAuth.repository().selectEntityByTenantId( tenantId,pageSize,pageNum);
    }
    public static List<SysGlobalAuth> selectEntityByTenantId(Long tenantId){
        return SysGlobalAuth.repository().selectEntityByTenantId(tenantId);
    }
    /**
     * 查询基础权限
     * @param sysGlobalAuth
     * @return
     */
    public static List<SysGlobalAuth> selectEntity(SysGlobalAuth sysGlobalAuth){
        return SysGlobalAuth.repository().selectEntity(sysGlobalAuth);
    }
}